//
//  HHMoneySuccessCell.m
//  HHBroker
//
//  Created by He Wei on 10/19/15.
//  Copyright © 2015 harry. All rights reserved.
//

#import "HHMoneySuccessCell.h"
#import "WMString-Utilities.h"

@implementation HHMoneySuccessCell

- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

- (void)setModel:(HHMoneyBaseModel *)model
{
    _model = model;
    [self changeLayout];
}

- (void)changeLayout
{
    switch (_model.type) {
        case JYContractTypeSuccessBySales:
        {
            self.title1Label.text = @"合同金额";
            self.title2Label.text = @"我的佣金";
            self.title3Label.text = @"合同编号";
            self.value1Label.text = _model.servicetype;
            self.value2Label.text = _model.amt;
            self.value3Label.text = _model.contract_num;
            
        }
            break;
        case JYContractTypeFine:
        case JYContractTypeSuccessBySelf:
            
        {
            self.title1Label.text = @"我的佣金";
            self.title2Label.text = @"资源编号1";
            self.title3Label.text = @"资源编号2";
            
            self.value1Label.text = _model.amt;
            self.value2Label.text = _model.cust_id;
            self.value3Label.text = _model.rvr_cust_id;
        }
            break;
            
        default:
            break;
    }
    
    self.typeLabel.text = _model.type_string;
    self.dateLabel.text = [NSString time3Stamp:_model.happen_time];
    
}

+ (CGFloat)heightWithModel:(HHMoneyBaseModel *)model
{
    return 113.0f;
}


@end
